-- GENERATED SPELL FOR [Bloodwarder Marshal] --


function spell0_20035(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(35949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20035', 0, 1)
end

function spell1_20035(pUnit, Event) --@Uppercut,n/a--
pUnit:FullCastSpellOnTarget(34996,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20035', 521, 1)
end

function spell2_20035(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_20035', 525, 1)
end

function spell3_20035(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(36132,pUnit)
pUnit:RegisterEvent('Sorts_20035', 6000, 1)
end

function Sorts_20035(pUnit, Event)
local choix_sorts_20035 = math.random(0, 3)
if choix_sorts_20035 == 0 then
pUnit:RegisterEvent('spell0_20035', 1, 1)
end
if choix_sorts_20035 == 1 then
pUnit:RegisterEvent('spell1_20035', 1, 1)
end
if choix_sorts_20035 == 2 then
pUnit:RegisterEvent('spell2_20035', 1, 1)
end
if choix_sorts_20035 == 3 then
pUnit:RegisterEvent('spell3_20035', 1, 1)
end
end

function mob20035_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20035', math.random(1500, 3000), 1)
end

function mob20035_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20035_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20035_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20035, 1, 'mob20035_Action')
RegisterUnitEvent(20035, 2, 'mob20035_Leave')
RegisterUnitEvent(20035, 3, 'mob20035_Kill')
RegisterUnitEvent(20035, 4, 'mob20035_Die')
